package cn.codeforfun.controller;

import cn.codeforfun.jfinalplugin.activemq.core.JFinalQueue;
import cn.codeforfun.mq.queue.SecondQueue;
import cn.codeforfun.mq.topic.FirstTopic;
import com.jfinal.core.Controller;

/**
 * Created by Administrator on 2016/3/26.
 */
public class IndexController extends Controller {

    public void index() {
        renderJsp("index.jsp");
    }

    public void queue1() {
        JFinalQueue.sendMessage("queue1", getPara("param"));
        renderJson();
    }

    public void queue2() {
        SecondQueue.sendMessage("queue2", getPara("param"));
        renderJson();
    }

    public void topic1() {
        FirstTopic.sendMessage("topic1", getPara("param"));
        renderJson();
    }

    public void topic2() {
        FirstTopic.sendMessage("topic2", getPara("param"));
        renderJson();
    }
}
